#ifndef _GENERAL_CONFIG_LABEL_H_
#define _GENERAL_CONFIG_LABEL_H_

#define DEBUG_STOP_IWDG() __HAL_DBGMCU_FREEZE_IWDG()
#define DEBUG_RESUME_IWDG() __HAL_DBGMCU_UNFREEZE_IWDG()

/*电机控制开关*/
//#define CHASSIS_OFF
//#define GIMBAL_OFF
//#define SHOOT_OFF


#define UPPER_PC_TRANSMIT_ENABLE
#define LF 0	//left-front
#define RF 1	//right-front
#define RB 2	//right-back
#define LB 3	//left-back
#define CHASSIS_MOTOR_NUM 4

#define LEFT 0
#define RIGHT 1
#define MOTOR_NUM 2



/*机器人参数相关*/
#define PI 3.1415926f
#define WHEEL_RADIUS 0.076f
#define ROBOT_CENTER_TO_WHEEL_RADIUS 0.209f
#define M3508_REDUCTION_RATIO 14.0f
#define WHEEL_RPM_TO_WHEEL_MPS (2 * PI * WHEEL_RADIUS / 60.0f / M3508_REDUCTION_RATIO) // * MOTOR_MECHENICAL_SPEED
#define WHEEL_MPS_TO_WHEEL_RPM (1 / (WHEEL_RPM_TO_WHEEL_MPS*1.0f)) // * m/s speed
#define ROBOT_RPS_TO_WHEEL_MPS (2 * PI * ROBOT_CENTER_TO_WHEEL_RADIUS) // * RPS 
#define WHEEL_MPS_TO_ROBOT_RPS (1 / (ROBOT_RPS_TO_WHEEL_MPS*1.0f))


/*通用遥控器拨杆键值，所有遥控器需统一*/
#define NORM_RC_SW_UP 1
#define NORM_RC_SW_MID 3
#define NORM_RC_SW_DOWN 2

/*电机相关*/
#define M3508_MAX_OUTPUT_CURRENT  16000
#define GM6020_MAX_OUTPUT_VOLTAGE 30000
#define GM6020_MAX_OUTPUT_CURRENT 16000
#define M2006_MAX_OUTPUT_CURRENT 10000
#define LK_MG_MAX_OUTPUT_CURRENT 2000
#define LK_MS_MAX_OUTPUT_CURRENT 1000
#define GM6020_FULL_CIRCLE_MECHENICAL_ANGLE 8191.0f
#define LKMG4005_FULL_CIRCLE_MECHENICAL_ANGLE 524287.0f
#define LKMS5005_FULL_CIRCLE_MECHENICAL_ANGLE 32767.0f

/*当前所开任务线程数-除软件看门狗任务外*/
#define CREATE_TASK_NUM 8

/*任务编号*/
#define REMOTE_RECEIVE_TASK_NUM 	0
#define STATE_TASK_NUM 				1
#define DECISION_TASK_NUM 			2
#define CONTROL_TASK_NUM 			3
#define IMU_TASK_NUM 				4
#define DEBUG_TASK_NUM              5
#define UPPER_COMM_TASK_NUM			6
#define UI_OPERATION_TASK_NUM		7

/*设定任务周期-如果有定周期执行的任务*/
#define MONITOR_TASK_PERIOD_SET				50
#define	STATE_TASK_PERIOD_SET				10
#define DECISION_TASK_PERIOD_SET			10
#define CONTROL_TASK_PERIOD_SET				3//3
#define IMU_TASK_PERIOD_SET					2
#define DEBUG_TASK_PERIOD_SET             	3
#define UPPER_COMM_TASK_PERIOD_SET          4
#define UI_OPERATION_TASK_PERIOD_SET		6//6//10
#endif


